package com.design;

/**
 * 简单格式输出
 */
public class SimpleReportVisitor implements ReportVisitor {
    @Override
    public void visitUserReport(UserReport userReport) {
        System.out.println(userReport.getName() + "," + userReport.getAge() + "," + userReport.getAddress());
    }

    @Override
    public void visitSaleReport(SaleReport saleReport) {
        System.out.println(saleReport.getProductName()+","+saleReport.getPrice()+","+saleReport.getQuantity());
    }
}
